package com.sbl.bajw.pc.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sbl.bajw.common.MyBatisDao;
import com.sbl.bajw.mapper.QFQZModelDao;
import com.sbl.bajw.pc.model.QFQZModel;

@Service
public class QFQZModelService {

	@Resource
	private QFQZModelDao dao;
	
	@Resource
	private MyBatisDao gridDao;
	
	public String getPersonByCons(HashMap<String, Object> parm) throws Exception{
		String model = gridDao.selectPage(QFQZModelDao.class, parm, "getPersonByCons");
		return model;
	}
	
	public QFQZModel getModelById(String id){
		QFQZModel model = dao.getModelById(id);
		return model;
	}
	
	public List<Map<String, String>> getCountByType(HashMap<String, String> map) throws Exception{
		List<Map<String, String>> list = dao.getCountByType(map);
		return list;
	}
	
	public List<Map<String, Object>> getSubCount(HashMap<String, Object> parm) throws Exception{
		List<Map<String, Object>> list = dao.getSubCount(parm);
		return list;
	}
	
	public String getModelByConditions(HashMap<String, Object> parm){
		String list = gridDao.selectPage(QFQZModelDao.class, parm, "getModelByConditions");
		return list;
	}
	
	public List<HashMap<String, Object>> getQFQZUnit(HashMap<String, String> parm) throws Exception{
		List<HashMap<String, Object>> model = dao.getQFQZUnit(parm);
		return model;
	}
}
